package org.springblade.modules.admin.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;

import java.util.Date;
import java.util.HashMap;
import java.util.List;

/**
    * 故障工单明细
    */
@Data
@EqualsAndHashCode(callSuper=true)
@TableName(value = "blade_maintain_malfunction_work")
public class MaintainMalfunctionWork extends TenantEntity {
    /**
     * 任务id
     */
    @TableField(value = "plan_id")
    private Long planId;


    /**
     * 故障图片和视频
     */
	@TableField(typeHandler = JacksonTypeHandler.class)
	@ApiModelProperty("故障图片")
	private List<HashMap<String,String>> mfImgUrl;

    /**
     * 故障描述
     */
    @TableField(value = "mf_desc")
	@ApiModelProperty("故障描述")
    private String mfDesc;

    /**
     * 问题描述项，dict_key拼接
     */
    @TableField(value = "problem_item")
    private String problemItem;

    /**
     * 故障现象其他描述
     */
    @TableField(value = "problem_other_desc")
    private String problemOtherDesc;

    /**
     * 故障地点
     */
    @TableField(value = "address")
    private String address;

    /**
     * 报障人姓名
     */
    @TableField(value = "`name`")
    private String name;

    /**
     * 电梯状态： 1-正常,2-停梯
     */
    @TableField(value = "elevator_stop")
    private Integer elevatorStop;

    /**
     * 报障人联系方式
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 报障单位名称
     */
    @TableField(value = "fault_company")
    private String faultCompany;

    /**
     * 补充故障原因
     */
    @TableField(value = "fault_reason_item")
    private String faultReasonItem;

    /**
     * 补充故障原因其他描述
     */
    @TableField(value = "fault_reason_other_desc")
    private String faultReasonOtherDesc;

    /**
     * 故障说明
     */
    @TableField(value = "fault_desc")
    private String faultDesc;

	/**
	 * 补充故障原因图片和视频
	 */
	@TableField(typeHandler = JacksonTypeHandler.class,updateStrategy = FieldStrategy.IGNORED,insertStrategy = FieldStrategy.IGNORED)
	@ApiModelProperty(value = "补充故障原因图片和视频")
	private List<HashMap<String,String>> faultImg;

	/**
	 * 部件id集合
	 */
	@TableField(value = "parts_ids")
	private String partsIds;

	/**
	 * 部件名称集合
	 */
	@TableField(value = "parts_names")
	private String partsNames;

	/**
	 * 层站结构id集合
	 */
	@TableField(value = "floor_stand_ids")
	private String floorStandIds;

	/**
	 * 层站结构名称集合
	 */
	@TableField(value = "floor_stand_names")
	private String floorStandNames;

	/**
	 * 任务来源
	 */
	@TableField(value = "plan_from")
	private Integer planFrom;

	@ApiModelProperty("维修记录id,来源")
	private Long malHistoryId;

	@ApiModelProperty("转派状态1:转派工单0:非")
	private Integer giveStatus;

	@ApiModelProperty("关闭描述")
	private String closeDesc;

	@ApiModelProperty("关闭人")
	private String closeUserName;

	/**
	 * 1-无需更换 2-建议更换 3-已更换
	 */
	@TableField(value = "parts_ope")
	private Integer partsOpe;
}
